// import React from 'react'
// ===================================================================== 
import Ctr from './utils/ctr'
// ===================================================================== global declare
const { $fn } = window
// ===================================================================== 
const Index = function(rows){
	const { mode } = rows
	const isEntrust = window.location.href.indexOf('/entrust-testing-center/') !== -1
	const _ctr = Ctr.call(this, rows)
	const hasMode = arr => arr.includes(mode)
	const { check_view_mode } = $fn.getUser()
	return [
		// 结果录入
		[
			hasMode([44022, 44021, 44033]) ? _ctr.statistics('统计') : {},
			// 上机增加空结果上机 2021-9-28  --马婷
			// hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016 ]) ? _ctr.confirm('上机') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016 ]) ? _ctr.operateComputer : {},
			hasMode([44015]) ? _ctr.search44015('查看所有',0) : {},
			hasMode([44015]) ? _ctr.search44015('查看待接种',1) : {},
			hasMode([44015]) ? _ctr.search44015('查看待收获',2) : {},
			hasMode([44015]) ? _ctr.confirm('接种') : {},
			hasMode([44015]) ? _ctr.confirm('收获') : {},
			hasMode([44018]) ? _ctr.search44018('查看所有',0) : {},
			hasMode([44018]) ? _ctr.search44018('查看前处理',1) : {},
			hasMode([44018]) ? _ctr.search44018('查看杂交',2) : {},
			hasMode([44018]) ? _ctr.search44018('查看后处理',3) : {},
			hasMode([44018]) ? _ctr.confirm('前处理') : {},
			hasMode([44018]) ? _ctr.confirm('杂交') : {},
			hasMode([44018]) ? _ctr.confirm('后处理') : {},
			// 检测中心分栏模式不显示【保存结果】31行，50行，68行，94行   2021-9-6  --马婷 
			// hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.confirm('保存结果') : {},
			+ check_view_mode === 1 ? {} : (hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.confirm('保存结果') : {}),
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('提交') : {},	
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('迟发') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('退单') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('项目终止') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.modInfo('修改资料') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016])  && !isEntrust ? _ctr.waibao('转外包') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.resultLog('结果操作日志') : {},
			hasMode([44014, 44028, 44025, 44024, 44031, 44027]) ? _ctr.setResult('设置结果') : {},
			hasMode([44014]) ? _ctr.uploadResult('上传结果') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.sameName('查看同名历史记录') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032]) ? _ctr.modSpecType('批量修改标本类型') : {},
			// 2021-7-15 5:47:45 ?F10: PM? --伍智睿
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) && isEntrust ? _ctr.groupWaibao('集团内转外包') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('删除结果') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.superSearch('高级搜索') : {},
			// 导出  2022-7-25 --马婷
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.exportList('导出') : {},
			// 生成布板  2022-7-27 --马婷
			hasMode([44014]) ? _ctr.createBoard('生成布板') : {}
		],
		// 已提交
		[
			// hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.confirm('保存结果') : {},
			+ check_view_mode === 1 ? {} : hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.confirm('保存结果') : {},
			hasMode([44013, 44022, 44021, 44008, 44029, 44030, 44032, 44033 ])  ? _ctr.confirm('回退') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('审核') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.noPass('不通过') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('迟发') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('退单') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('项目终止') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.modInfo('修改资料') : {},
			// hasMode([44013, 44022, 44021, 44008, 44029, 44030])  ? _ctr.previewAndAudit('预览并批准报告单') : {},
			hasMode([44013, 44022, 44021, 44008, 44029, 44030, 44032, 44033])  ? _ctr.perviewReport : {},
			// hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.crisisReport('危机值报告') : {}
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.sameName('查看同名历史记录') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('删除结果') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.superSearch('高级搜索') : {}
		],
		// 已审核
		[
			// hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016]) ? _ctr.confirm('保存结果') : {},
			+ check_view_mode === 1 ? {} : hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.confirm('保存结果') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.confirm('批量批准') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.handAudit('手动批准') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.noPass('拒绝') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.confirm('迟发') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.confirm('退单') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.confirm('项目终止') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.modInfo('修改资料') : {},
			// hasMode([44014, 44017, 44011, 44020, 44012, 44025, 44019, 44015, 44027, 44016]) ? _ctr.crisisReport('危机值报告') : {}
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.previewAndAudit('预览并批准报告单') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.mergeProject('合并项目') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016, 44018]) ? _ctr.mergeProjectManage('合并项目管理') : {},
			hasMode([44013, 44022, 44021,44008, 44029, 44030, 44032, 44033]) ? _ctr.stopReport('报告终止') : {},
			hasMode([44013, 44022, 44021,44008, 44029, 44030, 44032, 44033, 44018]) ? _ctr.perviewReport : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.sameName('查看同名历史记录') : {},
			hasMode([44014, 44028, 44017, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44027, 44016]) ? _ctr.confirm('删除结果') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.superSearch('高级搜索') : {}
		],
		// 已批准
		[
			hasMode([44014, 44028, 44017,44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.stopReport('报告终止') : {},
			hasMode([44014, 44028, 44017,44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.perviewReport : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.sameName('查看同名历史记录') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.superSearch('高级搜索') : {}
		],
		// 已迟发
		[
			// hasMode([44014, 44028, 44017,44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.confirm('保存结果') : {},
			+ check_view_mode === 1 ? {} : hasMode([44014, 44028, 44017,44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016]) ? _ctr.confirm('保存结果') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.confirm('提交') : {},
			// 迟发增加导入结果 2022/8/29  --马婷
			hasMode([44014]) ? _ctr.uploadResult('上传结果') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.perviewReport : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.sameName('查看同名历史记录') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.superSearch('高级搜索') : {}
		],
		// 已退单
		[
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.perviewReport : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.sameName('查看同名历史记录') : {},
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.superSearch('高级搜索') : {}
		],
		// 终止
		[
			hasMode([44014, 44028, 44017, 44013, 44022, 44021, 44008, 44029, 44030, 44011, 44012, 44020, 44025, 44024, 44019, 44015, 44031, 44018, 44027, 44016, 44032, 44033]) ? _ctr.superSearch('高级搜索') : {}
		]
	]
}
export default Index